

package jetbrains.buildServer.server.rest.data;

import java.util.Date;
import jetbrains.buildServer.serverSide.BuildServerAdapter;
import jetbrains.buildServer.serverSide.SBuildServer;
import org.springframework.stereotype.Component;

/**
 * @author Yegor.Yarko
 *         Date: 17.11.2009
 */
@Component
public class ServerListener extends BuildServerAdapter {
  protected Date myServerStartTime;

  public ServerListener(final SBuildServer server) {
    server.addListener(this);
  }

  public Date getServerStartTime() {
    return myServerStartTime;
  }

  @Override
  public void serverStartup() {
    myServerStartTime = new Date();
  }
}